      FUNCTION ISPIN(TIME,TZSPIN,TSTOP,DELTAT,JUMP)
C
C                  'ISPIN' IS A FUNCTION SUBROUTINE TO SET UP INDICES
C                  TO APPLY AND  REMOVE TORQUING TO SPIN AXIS
C
      REAL*8  TIME,TZSPIN,TSTOP,DELTAT,TOTAL
C
      TOTAL=TIME + DELTAT
      GO TO (10,30,30),JUMP
   10 IF(TOTAL.GE.TZSPIN) GO TO 20
      ISPIN=2
      RETURN
C
   20 ISPIN=1
      JUMP=2
      RETURN
C
   30 IF(TIME.GE.TSTOP) GO TO 40
      ISPIN=2
      RETURN
C
   40 JUMP=3
      ISPIN=1
      RETURN
      END
